package com.jmp.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import one.stand.dto.PageResponse2;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author cjr
 */
@Data
@Builder
public class SupplierOrderResponse {
    @ApiModelProperty(value = "订单列表", dataType = "SupplierOrderResponse.Order")
    private PageResponse2<Order> orderPage;

    @ApiModel("SupplierOrderResponse.Order")
    @Data
    @Builder
    public static class Order {
        private Integer ordersId;
        private Integer orderPrice;
        @ApiModelProperty("订单状态: 1待支付 2待发货 3已发货 4已完成 5已取消 6退款申请 7退款完成")
        private Integer orderStatus;

        @ApiModelProperty("用户ID")
        private Integer userId;
        @ApiModelProperty("用户头像")
        private String userImg;
        @ApiModelProperty("用户名称")
        private String userName;

        @ApiModelProperty("是否可取消：1可取消，取消接口为 我的订单列表-取消接口")
        private Integer cancelFlag;
        @ApiModelProperty("是否可发货：1可发货")
        private Integer sendFlag;
        @ApiModelProperty("是否可拒绝退款：1可拒绝退款")
        private Integer refundRefuseFlag;
        @ApiModelProperty("是否可同意退款：1可同意退款")
        private Integer refundAgreeFlag;

        @ApiModelProperty(value = "商品列表", dataType = "SupplierOrderResponse.Goods")
        private List<Goods> goodsList;
    }

    @ApiModel("SupplierOrderResponse.Goods")
    @Data
    @Builder
    public static class Goods {
        @ApiModelProperty("商品ID")
        private Integer goodsId;
        @ApiModelProperty("商品名称")
        private String goodsName;
        @ApiModelProperty("商品图片")
        private String goodsPhoto;
        @ApiModelProperty("SKU名称")
        private String skuName;
        @ApiModelProperty("SKU数量")
        private Integer skuNum;
        @ApiModelProperty("价格")
        private BigDecimal price;
    }
}
